<?php
namespace App\Models;

class SmsMtTestLoger extends Base {

    public function initialize() {
        parent::initialize();
    }

    public function getSource() {
        return "sms_mt_test_log";
    }

    /**
     * 新增下行日志
     *
     * @param array $data
     *
     * @return int|false
     */
    public function add($data) {
        try {
            if($this->db()->insertAsDict($this->getSource(), $data)) {
                return $this->db()->lastInsertId();
            }
        } catch(\PDOException $ex) {
            $this->errorLog('INSERT', $this->db()->getSQLStatement(), $ex->getMessage(), __FILE__, __LINE__);
        }
        return false;
    }
}
